<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <script type="text/javascript">
      // if(undefined){
      //   alert("undefined 是真的");
      // }else{
      //   alert("undefined 是假的");
      // }
      //
      //
      // // 定义一个字符串
      // var s = "hello";
      // // s[2];
      // alert(s[2]);
      //
      // var string = "hello";
      // // alert();
      // console.log(atob(btoa(string)));
      //
      // // var o = {
      // //   p : function (x) {
      // //     return 2*x;
      // //   },
      // // }
      //
      // var o = {};
      // var o2 = o;
      //
      // o.b = 1;
      //
      // console.log(o2.b);


      // console.log(o.p(5));
      console.log("=========属性调用============");
      var names = {
        hellos : "hell world",
        age : 15,
      };
      console.log(names.hellos);
      console.log(names['hellos']);

      console.log("=========属性赋值============");
      var age = names.hellos;
      age = 12;
      console.log(age);

      console.log("=========查看所有属性============");
      var obj = Object.keys(age);
      console.log(names);

      console.log("=========delete============");
      console.log(delete names.age);
      console.log(Object.keys(names));

      console.log("=========in============");
      console.log('age' in names);

      console.log("=========for in============");
      for (var i in names) {
        console.log(names[i]);
      }

      console.log("=========for============");
      for (var i = 0; i < names.length; i++) {
        console.log(i);
        console.log(names[i]);
      }

      console.log("=========数组============");
      var pepole = ['a','b','c'];

      console.log(typeof pepole);


      function getname(a,b,c) {
        // alert(a+b+c);
      }

      console.log(getname('1','2','3'));

      console.log("=========变量赋值============");
      var hello = function () {
          return 'hell world';
      };

      console.log(hello());

      // js
    </script>
  </body>
</html>
